Skip to content
  • 0 Votes
    15 Posts
    30k Views
    p3c0P

    Hi @Alper,
    Here is what works.
    Use ScrollView instead of Flickable for scrollbars. Then as per this we need to explicitly set the contentItem as this newly created component.
    A very minimal example:

    import QtQuick 2.6 import QtQuick.Controls 1.4 Item { id: root width: 200 height: 200 ScrollView { id: scroll anchors.fill: parent } Button { text: "Load" onClicked: { var component = Qt.createComponent("Dummy.qml"); var obj = component.createObject(scroll); scroll.contentItem = obj } } } //Dummy.qml import QtQuick 2.6 Image { id: image; source: "http://placehold.it/650x650&text=\"Qt\"" }